package com.scs.application.modules.wm.service;

import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.thirdparty.dto.his.*;
import com.scs.application.modules.thirdparty.request.convert.his.zhonglian.dto.HisStockQueryZhongLian;
import com.scs.application.modules.thirdparty.request.convert.his.zhonglian.dto.HisStockResultZhongLian;
import com.scs.application.modules.wm.entity.StockDept;
import com.scs.application.modules.wm.entity.Transfer;
import com.scs.application.modules.wm.entity.TransferItem;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 科室三级库 Service
 * </p>
 */

public interface StockDeptService extends IBaseService<StockDept> {

    //查询 包含hiscode matrcode
    List<HislowQueryResult> listWithHisCodeAndHrpCode(HislowQuery query, boolean flagGt0);

    List<HisStockResultZhongLian> listBatchByHisIdForZl(List<HisStockQueryZhongLian> queryList);

    @Transactional(rollbackFor = Exception.class)
    void billBatchByHisIdForZl(HisHighBillBatch query,Boolean isReturn);

    // 锁定
    void lock(HislowLock query);

    // 解锁
    void unlock(HislowUnlock query);

    //批量低值计费
    void billBatch(HislowBillBatch param,boolean flagRefund);

    //添加三级库库存
    @Transactional(rollbackFor = Exception.class)
    void addByTransfer(Transfer transfer, List<TransferItem> transferItems);
}
